<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>Signin Template for Bootstrap</title>
    <!-- @{}的形式是链接资源文件或者访问某个请求路径 -->
    <link th:href="@{/css/loginstyle.css}" rel="stylesheet">
    <link th:href="@{/css/style.css}" rel="stylesheet">
    <link th:href="@{/css/antd.css}" rel="stylesheet">
    <link th:href="@{/css/antd.min.css}" rel="stylesheet">
    <link th:href="@{/css/antd.btn.css}" rel="stylesheet">
    <link th:href="@{/css/antd.input.css}" rel="stylesheet">
</head>

<body>
<!--此处要写成method="POST"，不能写成th:method="POST"-->
<div class="container">
    <form class="loginForm" th:action="@{/auth-ui/sso/do-login}" method="POST">
        <!--        <img class="mb-4" src="static/imgs/logo.png" alt="" width="72" height="72">-->
        <!--        &lt;!&ndash;#{}的形式是从国际化配置文件中取值&ndash;&gt;-->
        <!--        <h1 class="h3 mb-3 font-weight-normal" th:text="${login.tip}">Please sign in</h1>-->
        <!--        <span style="color:red" th:text="${msg}"></span>-->

        <input type="hidden" name="tenantId" th:value="${sso_auth_token?.tenantId}"/>
        <input type="hidden" name="terminalId" th:value="${sso_auth_token?.terminalId}"/>
        <input type="hidden" name="clientId" th:value="${sso_auth_token?.clientId}"/>
        <input type="hidden" name="clientSecret" th:value="${sso_auth_token?.clientSecret}"/>
        <input type="hidden" name="platformToken" th:value="${sso_auth_token?.platformToken}"/>
        <input type="hidden" name="ticketUrl" th:value="${sso_auth_token?.ticketUrl}"/>
        <input type="hidden" name="redirectUrl" th:value="${sso_auth_token?.redirectUrl}"/>

        <div style="margin-bottom: 15px;display: flex;justify-content: center;flex-direction: column">
            <div class="headerLogin">
                <img class="logo" th:src="@{/images/logo.png}"/>
            </div>
            <strong class="title" style="padding-top: 10px;padding-bottom: 6px">运营后台</strong>
        </div>

        <div style="margin-bottom: 26px;display: flex;flex-direction: column">
            <input type="text" name="username" style="padding:6px;font-size:13px;"
                   class="ant-input-affix-wrapper" placeholder="请输入您的登录账号"/>
        </div>
        <div style="display: flex;flex-direction: column">
            <input type="password" name="password" style="padding:6px;font-size:13px;"
                   class="ant-input-affix-wrapper" placeholder="密码"/>
            <a style="align-self: flex-end; margin-right: 6px" >忘记密码</a>
        </div>
        <div>
            <span style="color:red;font-size: 10pt;" th:text="${msg}"></span>
        </div>

        <!--        <FormItem>-->
        <!--            {/*{getFieldDecorator('isRemember', {-->
        <!--            })(-->
        <!--            <Checkbox>记住账号</Checkbox>-->
        <!--            )}*/}-->
        <!--            {/* <a-->
        <!--                style={{ float: 'left' }}-->
        <!--            onClick={() => history.push('/company-register')}-->
        <!--            >-->
        <!--            商家注册-->
        <!--            </a> */}-->
        <!--            <a-->
        <!--                    style={{ float: 'right' }}-->
        <!--            onClick={() => history.push('/find-password')}-->
        <!--            >-->
        <!--            忘记密码-->
        <!--            </a>-->
        <!--        </FormItem>-->
        <div style="margin-top: 24px;margin-bottom: 24px;display: flex;flex-direction: column">
            <Button type="primary" style="padding:6px;" htmlType="submit" class="loginBtn ant-btn">登录</Button>
        </div>

        <p style="margin:0;text-align:center;line-height:20px;color:#999;font-size:14px;">
            © 2017-2022 华勤科技有限公司
        </p>
        <p style="margin:0;text-align:center;line-height:20px;color:#999;font-size:14px;">
            版本号：WLC V0.1.0
        </p>

        <!--        <label class="sr-only" th:text="${login?.username}">Username</label>-->
        <!--        &lt;!&ndash;要写上name="username",否则访问LoginController方法时，没有传username会报错&ndash;&gt;-->
        <!--        <input type="text" name="username" class="form-control" placeholder="Username"-->
        <!--               th:placeholder="${sso_auth_token.username}" required="" autofocus="">-->
        <!--        <label class="sr-only" th:text="${login?.password}">Password</label>-->
        <!--        <input type="password" name="password" class="form-control" placeholder="Password"-->
        <!--               th:placeholder="${sso_auth_token.password}" required="">-->
        <!--        <div class="checkbox mb-3">-->
        <!--            <label>-->
        <!--                <input type="checkbox" value="remember-me"> [[${login.remember}]]-->
        <!--            </label>-->
        <!--        </div>-->
        <!--        <button class="btn btn-lg btn-primary btn-block" type="submit" th:text="${login.btn}">Sign in</button>-->
        <!--        <p class="mt-5 mb-3 text-muted">© 2017-2018</p>-->
        <!--        &lt;!&ndash;要写成th:href="@{/index(l='zh_CN')}"，而不能写成th:href="@{/login.html(l='zh_CN')}",-->
        <!--        因为直接定位到静态资源的话是不会走自己定义的区域解析器的，-->
        <!--        另外thymeleaf模板引擎是用中括号中放key=value的形式传参数&ndash;&gt;-->
        <!--        <a class="btn btn-sm" th:href="@{/index(l='zh_CN')}">中文</a>-->
        <!--        <a class="btn btn-sm" th:href="@{/index(l='en_US')}">English</a>-->
    </form>
</div>
</body>

</html>